package com.wuchao.spring.print;

import com.sun.javafx.binding.StringFormatter;

import java.text.MessageFormat;

/**
 * @Author wuchao66
 * @Date 2023/9/21 15:39
 * @PackageName:com.wuchao.spring.print
 * @ClassName: Printer
 * @Description: TODO
 * @Param
 * @Version 1.0
 */
public class Printer {//ioc 1get/set  传参在外面

    public Paper getPaper() {
        return paper;
    }

    public void setPaper(Paper paper) {
        this.paper = paper;
    }

    private  Paper paper;

    public Ink getInk() {
        return ink;
    }

    public void setInk(Ink ink) {
        this.ink = ink;
    }

    private Ink ink;
    public  void show(){
        //String.format("%s油墨在%s纸上打印",ink.getInk(),paper.getPaper());
        System.out.println( MessageFormat.format("{0}油墨在{1}纸上打印",ink.getInk(),paper.getPaper()));
    }
}
